home *** CD-ROM | disk | FTP | other *** search
/ The CICA Windows Explosion! / The CICA Windows Explosion! - Disc 2.iso / programr / mathstud.zip / MESHDOM.M < prev    next >
Text File  |  1993-03-23  |  594b  |  32 lines

  1. function [x1, y1] = meshdom(x,y)
  2. %[x1, y1] = meshdom(x,y)
  3. %compatibility function
  4.  
  5. %       S.Halevy 7/31/92
  6. %       Copyright (c) 1992 by the MathWizards
  7.  
  8. % error checking
  9. if nargin < 2
  10.    error('meshdom: not enough input arguments');
  11. end
  12. if  ~isvector(x) || ~isvector(y)
  13.    error('meshdom: input arguments must be vectors');
  14. end
  15.  
  16. x1=x;
  17. if ~isrow(x1)       % transpose a col vecor
  18.    x1=x1.';
  19. end
  20.  
  21. y1=y;
  22. if ~iscol(y1)       % transpose a row vecor
  23.    y1=y1.';
  24. end
  25.  
  26. nx = length(x);
  27. ny = length(y);
  28. x1 = x1(ones(ny, 1),:);
  29.  
  30. y1 = flipud(y1);
  31. y1 = y1(:,ones(1, nx));
  32.